package com.hhck.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.ToString;
import java.util.Date;

/**
 * user_info表的实体类
 */
@Data
@ToString
public class User {

	// 用户id
	private int userId;

	// 账号
	private String userCode;

	// 用户名
	private String userName;

	// 用户密码
	private String userPwd;

	// 用户类型
	private String userType;

	// 用户状态
	private String userState;

	// 删除状态
	private String isDelete;

	// 创建人
	private int createBy;

	// 创建时间（返回前端时，自动将Date转换成指定格式的json字符串）
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date createTime;

	// 修改人
	private int updateBy;

	// 修改时间
	private Date updateTime;

	/**
	 * 追加的属性（创建人）
	 */
	private String createByName;

	public User() {

	}

	public User(int userId, String userCode, String userName, String userPwd,
			String userType, String userState, String isDelete, int createBy,
			Date createTime, int updateBy, Date updateTime) {
		this.userId = userId;
		this.userCode = userCode;
		this.userName = userName;
		this.userPwd = userPwd;
		this.userType = userType;
		this.userState = userState;
		this.isDelete = isDelete;
		this.createBy = createBy;
		this.createTime = createTime;
		this.updateBy = updateBy;
		this.updateTime = updateTime;
	}

}

